{% extends "base.html" %}
{% block title %}OMS{% endblock %}
{% block css %}
<!-- DataTables-->
<link rel="stylesheet" href="/static/plugins/dataTables/css/dataTables.css">
{% endblock %}




{% block content %}
       <div class="row">
            <div class="col-md-12">
               <!--breadcrumbs start -->
               <ul class="breadcrumb">
                     <li><a href="{% url 'index' %}">Dashboard</a>
                     </li>
                     <li>监控管理</li>
                     <li class="active">智能硬件监控</li>
               </ul>
               <!--breadcrumbs end -->
               <h2 class="h2">智能硬件接口信息状态列表</h2>
            </div>
       </div>
                            <form class="form-horizontal form-border" method="post" enctype="multipart/form-data" action=".">

                                    <div class="form-group">
                                          <label class="col-sm-3 control-label">选择模块</label>
                                          <div class="col-sm-6">
                                              <select name="mk">
                                                  <!--<option value="0">000</option>-->
                                                  <!--<option value="1">111</option>-->
                                                  {% for each_inter in all_inter %}
                                            <option value="{{ each_inter.module }}">{{ each_inter.module }}</option>
                                                  {% endfor %}
                                             </select>


                                          </div>
                                    </div>

                                    <div class="form-group">
                                        <!--<input type="hidden" name="mod" value='fabu'>-->

                                         <div class="col-sm-offset-8 col-sm-10">
                                              <button type="submit" class="btn btn-primary">Send</button>
                                         </div>
                                    </div>


                                <div class="form-group">
                                          <label class="col-sm-3 control-label">返回结果</label>
                                          <div class="col-sm-6">
                                               <textarea class="form-control" rows="4">{{ ret }}</textarea>
                                          </div>
                                    </div>
                             </form>


       <div class="row">
            <div class="col-md-12">
                 <div class="panel panel-default">
                      <div class="panel-body">
                           <table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
                               <thead>
                                   <tr>
                                      <th>模块</th>
                                      <th>接口地址</th>
                                      <th>头部</th>
                                       <th>请求主体</th>
                                      <th>请求方式</th>
                                      <th>请求频率</th>
                                      <th>http状态</th>
                                      <th>最后请求时间</th>
                                      <th>备注</th>

                                   </tr>
                               </thead>


                               <tbody>
                                        {% for each_inter in all_inter %}

                                   <tr>
                                      <td >{{ each_inter.module }}</td>
                                      <td >{{ each_inter.url }}</td>
                                      <td >{{ each_inter.headers }}</td>
                                       <td>{{ each_inter.body }}</td>
                                       <td>{{ each_inter.request_mode }}</td>
                                       <td>{{ each_inter.update_interval }}</td>
                                       <td>{{ each_inter.status }}</td>
                                       <td>{{ each_inter.mod_time }}</td>
                                       <td>{{ each_inter.remark }}</td>
                                   </tr>
                                        {% endfor %}

                            </tbody>
                               </thead>
                            </table>
                         </div>
                     </div>
                 </div>
             </div>
      	<!--row end-->

{% endblock %}





